﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DFGK_WMS.Context.Migrations
{
    public partial class 修复移库单 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
              name: "T_TransferBinOrder",
              columns: table => new
              {
                  Id = table.Column<long>(type: "bigint", nullable: false),
                  OrderSn = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                  BillType = table.Column<int>(type: "int", nullable: true),
                  Status = table.Column<int>(type: "int", nullable: true),
                  SourceType = table.Column<int>(type: "int", nullable: true),
                  Proirity = table.Column<int>(type: "int", nullable: true),
                  Erpcode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                  Reason = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                  Remark = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                  SubmitUserId = table.Column<long>(type: "bigint", nullable: true),
                  SubmitUserName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                  SubmitDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                  AuditUserId = table.Column<long>(type: "bigint", nullable: true),
                  AuditUserName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                  AuditDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                  CreateUserId = table.Column<long>(type: "bigint", nullable: false),
                  CreateUserName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                  CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                  ModifyUserId = table.Column<long>(type: "bigint", nullable: false),
                  ModifyUserName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                  ModifyDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                  IsDel = table.Column<bool>(type: "bit", nullable: false)
              },
              constraints: table =>
              {
                  table.PrimaryKey("PK_T_TransferBinOrder", x => x.Id);
              });

            migrationBuilder.CreateTable(
                name: "T_TransferBinOrderDetail",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    OrderId = table.Column<long>(type: "bigint", nullable: true),
                    OrderSn = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    MaterialId = table.Column<long>(type: "bigint", nullable: true),
                    MaterialName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    FromWhId = table.Column<long>(type: "bigint", nullable: true),
                    FromWhName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    FromWhCode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    FromRegionId = table.Column<long>(type: "bigint", nullable: true),
                    FromRegionName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    FromRegionCode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    FromLocationId = table.Column<long>(type: "bigint", nullable: true),
                    FromLocationName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    FromLocationCode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ToWhId = table.Column<long>(type: "bigint", nullable: true),
                    ToWhName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ToWhCode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ToRegionId = table.Column<long>(type: "bigint", nullable: true),
                    ToRegionName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ToRegionCode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ToLocationId = table.Column<long>(type: "bigint", nullable: true),
                    ToLocationName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ToLocationCode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ExpectedStackingQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    ActualStackingQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    Quantity = table.Column<int>(type: "int", nullable: true),
                    IsFullStackingProirity = table.Column<bool>(type: "bit", nullable: true),
                    ExceptionCode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    ExceptionText = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    Status = table.Column<int>(type: "int", nullable: true),
                    FilterType = table.Column<int>(type: "int", nullable: true),
                    ToLogicalPartCode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    IsPriorityFilling = table.Column<int>(type: "int", nullable: true),
                    CreateUserId = table.Column<long>(type: "bigint", nullable: false),
                    CreateUserName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    ModifyUserId = table.Column<long>(type: "bigint", nullable: false),
                    ModifyUserName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    ModifyDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    IsDel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_T_TransferBinOrderDetail", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
    name: "T_TransferBinOrder");

            migrationBuilder.DropTable(
                name: "T_TransferBinOrderDetail");
        }
    }
}
